Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scamp on the Mac #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

lonewolf1870
Copy link

Dear Emmanuel,
following what was done by @mwcraig on previous Scamp and Sextractor versions, I added the link to the Accelerate library for easier installation of your tools on Macs.
I tested both software on macOS 10.14 and 10.15. and they work fine. Have a look at the modifications: I hope they turn to be useful.
Regards,
Luca

P.S. to install on the Mac, users can use the brew package manager by simply typing brew install --build-from-source [PATH TO BOTTLE].rb and using one of these:

Sextractor bottle: https://gist.github.com/lonewolf1870/102924c2ae2456874173e67bb44e8307#file-sextractor-rb
Scamp bottle: https://gist.github.com/lonewolf1870/102924c2ae2456874173e67bb44e8307#file-scamp-rb

@ebertin
Copy link
Member

ebertin commented Mar 22, 2021

OK thank you so much. This is great. I don't have access to a Mac to test this myself (until someone sets up CI on Mac 😄 ).
Meanwhile I tested on Linux with the --enable-accelerate option just to see. Obviously I did not expect it to work, however configure aborts right in the middle of operations without outputting any error message. Is it expected?

@mrkite92
Copy link
Collaborator

After some exchange with Emmanuel, I can make some massive tests on my own catalogs, but I don't wish to use brew (I use Mac Ports) to install. Another way to apply your patches?

@mrkite92
Copy link
Collaborator

OK, got it from you fork.

@lonewolf1870
Copy link
Author

lonewolf1870 commented Mar 22, 2021

OK thank you so much. This is great. I don't have access to a Mac to test this myself (until someone sets up CI on Mac 😄 ).
Meanwhile I tested on Linux with the --enable-accelerate option just to see. Obviously I did not expect it to work, however configure aborts right in the middle of operations without outputting any error message. Is it expected?

@ebertin well, I'm not a real developer, just adapting other people's code :-)
But no, I didn't ad any output message.

P.S.: if you want to give it a try, I think you can install macOS in a hypervisor such as VirtualBox

After some exchange with Emmanuel, I can make some massive tests on my own catalogs, but I don't wish to use brew (I use Mac Ports) to install. Another way to apply your patches?

@mrkite92 Below is the list of brew libraries I have installed. Consider that I only installed 3 packages with brew: sextractor, scamp and skymaker. All the others are dependancies.

autoconf		libffi			p7zip
automake		libidn2			pango
cairo			libmpc			pcre
fftw			libomp			pixman
fontconfig		libpng			pkg-config
freetype		libpthread-stubs	plplot
fribidi			libtool			[email protected]
gcc			libunistring		readline
gdbm			libx11			scamp
gettext			libxau			sextractor
glib			libxcb			skymaker
gmp			libxdmcp		sqlite
gobject-introspection	libxext			tcl-tk
graphite2		libxrender		wget
harfbuzz		lzo			wimlib
hwloc			mpdecimal		xorgproto
icu4c			mpfr			xz
isl			open-mpi
libevent		[email protected]

And here the full tree for Scamp:

brewsci/science/scamp
├── fftw
│   ├── open-mpi
│   │   ├── gcc
│   │   │   ├── gmp
│   │   │   ├── isl
│   │   │   │   └── gmp
│   │   │   ├── libmpc
│   │   │   │   ├── gmp
│   │   │   │   └── mpfr
│   │   │   │       └── gmp
│   │   │   └── mpfr
│   │   │       └── gmp
│   │   ├── hwloc
│   │   └── libevent
│   │       └── [email protected]
│   └── gcc
│       ├── gmp
│       ├── isl
│       │   └── gmp
│       ├── libmpc
│       │   ├── gmp
│       │   └── mpfr
│       │       └── gmp
│       └── mpfr
│           └── gmp
├── cdsclient
└── plplot
    ├── cairo
    │   ├── fontconfig
    │   │   └── freetype
    │   │       └── libpng
    │   ├── freetype
    │   │   └── libpng
    │   ├── glib
    │   │   ├── gettext
    │   │   ├── libffi
    │   │   ├── pcre
    │   │   └── [email protected]
    │   │       ├── gdbm
    │   │       ├── mpdecimal
    │   │       ├── [email protected]
    │   │       ├── readline
    │   │       ├── sqlite
    │   │       │   └── readline
    │   │       ├── tcl-tk
    │   │       │   └── [email protected]
    │   │       └── xz
    │   ├── libpng
    │   ├── libx11
    │   │   ├── libxcb
    │   │   │   ├── libpthread-stubs
    │   │   │   │   └── pkg-config
    │   │   │   ├── libxau
    │   │   │   │   └── xorgproto
    │   │   │   └── libxdmcp
    │   │   │       └── xorgproto
    │   │   └── xorgproto
    │   ├── libxcb
    │   │   ├── libpthread-stubs
    │   │   │   └── pkg-config
    │   │   ├── libxau
    │   │   │   └── xorgproto
    │   │   └── libxdmcp
    │   │       └── xorgproto
    │   ├── libxext
    │   │   ├── libx11
    │   │   │   ├── libxcb
    │   │   │   │   ├── libpthread-stubs
    │   │   │   │   │   └── pkg-config
    │   │   │   │   ├── libxau
    │   │   │   │   │   └── xorgproto
    │   │   │   │   └── libxdmcp
    │   │   │   │       └── xorgproto
    │   │   │   └── xorgproto
    │   │   └── xorgproto
    │   ├── libxrender
    │   │   ├── libx11
    │   │   │   ├── libxcb
    │   │   │   │   ├── libpthread-stubs
    │   │   │   │   │   └── pkg-config
    │   │   │   │   ├── libxau
    │   │   │   │   │   └── xorgproto
    │   │   │   │   └── libxdmcp
    │   │   │   │       └── xorgproto
    │   │   │   └── xorgproto
    │   │   └── xorgproto
    │   ├── lzo
    │   └── pixman
    ├── freetype
    │   └── libpng
    ├── gcc
    │   ├── gmp
    │   ├── isl
    │   │   └── gmp
    │   ├── libmpc
    │   │   ├── gmp
    │   │   └── mpfr
    │   │       └── gmp
    │   └── mpfr
    │       └── gmp
    └── pango
        ├── cairo
        │   ├── fontconfig
        │   │   └── freetype
        │   │       └── libpng
        │   ├── freetype
        │   │   └── libpng
        │   ├── glib
        │   │   ├── gettext
        │   │   ├── libffi
        │   │   ├── pcre
        │   │   └── [email protected]
        │   │       ├── gdbm
        │   │       ├── mpdecimal
        │   │       ├── [email protected]
        │   │       ├── readline
        │   │       ├── sqlite
        │   │       │   └── readline
        │   │       ├── tcl-tk
        │   │       │   └── [email protected]
        │   │       └── xz
        │   ├── libpng
        │   ├── libx11
        │   │   ├── libxcb
        │   │   │   ├── libpthread-stubs
        │   │   │   │   └── pkg-config
        │   │   │   ├── libxau
        │   │   │   │   └── xorgproto
        │   │   │   └── libxdmcp
        │   │   │       └── xorgproto
        │   │   └── xorgproto
        │   ├── libxcb
        │   │   ├── libpthread-stubs
        │   │   │   └── pkg-config
        │   │   ├── libxau
        │   │   │   └── xorgproto
        │   │   └── libxdmcp
        │   │       └── xorgproto
        │   ├── libxext
        │   │   ├── libx11
        │   │   │   ├── libxcb
        │   │   │   │   ├── libpthread-stubs
        │   │   │   │   │   └── pkg-config
        │   │   │   │   ├── libxau
        │   │   │   │   │   └── xorgproto
        │   │   │   │   └── libxdmcp
        │   │   │   │       └── xorgproto
        │   │   │   └── xorgproto
        │   │   └── xorgproto
        │   ├── libxrender
        │   │   ├── libx11
        │   │   │   ├── libxcb
        │   │   │   │   ├── libpthread-stubs
        │   │   │   │   │   └── pkg-config
        │   │   │   │   ├── libxau
        │   │   │   │   │   └── xorgproto
        │   │   │   │   └── libxdmcp
        │   │   │   │       └── xorgproto
        │   │   │   └── xorgproto
        │   │   └── xorgproto
        │   ├── lzo
        │   └── pixman
        ├── fontconfig
        │   └── freetype
        │       └── libpng
        ├── fribidi
        ├── glib
        │   ├── gettext
        │   ├── libffi
        │   ├── pcre
        │   └── [email protected]
        │       ├── gdbm
        │       ├── mpdecimal
        │       ├── [email protected]
        │       ├── readline
        │       ├── sqlite
        │       │   └── readline
        │       ├── tcl-tk
        │       │   └── [email protected]
        │       └── xz
        └── harfbuzz
            ├── cairo
            │   ├── fontconfig
            │   │   └── freetype
            │   │       └── libpng
            │   ├── freetype
            │   │   └── libpng
            │   ├── glib
            │   │   ├── gettext
            │   │   ├── libffi
            │   │   ├── pcre
            │   │   └── [email protected]
            │   │       ├── gdbm
            │   │       ├── mpdecimal
            │   │       ├── [email protected]
            │   │       ├── readline
            │   │       ├── sqlite
            │   │       │   └── readline
            │   │       ├── tcl-tk
            │   │       │   └── [email protected]
            │   │       └── xz
            │   ├── libpng
            │   ├── libx11
            │   │   ├── libxcb
            │   │   │   ├── libpthread-stubs
            │   │   │   │   └── pkg-config
            │   │   │   ├── libxau
            │   │   │   │   └── xorgproto
            │   │   │   └── libxdmcp
            │   │   │       └── xorgproto
            │   │   └── xorgproto
            │   ├── libxcb
            │   │   ├── libpthread-stubs
            │   │   │   └── pkg-config
            │   │   ├── libxau
            │   │   │   └── xorgproto
            │   │   └── libxdmcp
            │   │       └── xorgproto
            │   ├── libxext
            │   │   ├── libx11
            │   │   │   ├── libxcb
            │   │   │   │   ├── libpthread-stubs
            │   │   │   │   │   └── pkg-config
            │   │   │   │   ├── libxau
            │   │   │   │   │   └── xorgproto
            │   │   │   │   └── libxdmcp
            │   │   │   │       └── xorgproto
            │   │   │   └── xorgproto
            │   │   └── xorgproto
            │   ├── libxrender
            │   │   ├── libx11
            │   │   │   ├── libxcb
            │   │   │   │   ├── libpthread-stubs
            │   │   │   │   │   └── pkg-config
            │   │   │   │   ├── libxau
            │   │   │   │   │   └── xorgproto
            │   │   │   │   └── libxdmcp
            │   │   │   │       └── xorgproto
            │   │   │   └── xorgproto
            │   │   └── xorgproto
            │   ├── lzo
            │   └── pixman
            ├── freetype
            │   └── libpng
            ├── glib
            │   ├── gettext
            │   ├── libffi
            │   ├── pcre
            │   └── [email protected]
            │       ├── gdbm
            │       ├── mpdecimal
            │       ├── [email protected]
            │       ├── readline
            │       ├── sqlite
            │       │   └── readline
            │       ├── tcl-tk
            │       │   └── [email protected]
            │       └── xz
            ├── gobject-introspection
            │   ├── cairo
            │   │   ├── fontconfig
            │   │   │   └── freetype
            │   │   │       └── libpng
            │   │   ├── freetype
            │   │   │   └── libpng
            │   │   ├── glib
            │   │   │   ├── gettext
            │   │   │   ├── libffi
            │   │   │   ├── pcre
            │   │   │   └── [email protected]
            │   │   │       ├── gdbm
            │   │   │       ├── mpdecimal
            │   │   │       ├── [email protected]
            │   │   │       ├── readline
            │   │   │       ├── sqlite
            │   │   │       │   └── readline
            │   │   │       ├── tcl-tk
            │   │   │       │   └── [email protected]
            │   │   │       └── xz
            │   │   ├── libpng
            │   │   ├── libx11
            │   │   │   ├── libxcb
            │   │   │   │   ├── libpthread-stubs
            │   │   │   │   │   └── pkg-config
            │   │   │   │   ├── libxau
            │   │   │   │   │   └── xorgproto
            │   │   │   │   └── libxdmcp
            │   │   │   │       └── xorgproto
            │   │   │   └── xorgproto
            │   │   ├── libxcb
            │   │   │   ├── libpthread-stubs
            │   │   │   │   └── pkg-config
            │   │   │   ├── libxau
            │   │   │   │   └── xorgproto
            │   │   │   └── libxdmcp
            │   │   │       └── xorgproto
            │   │   ├── libxext
            │   │   │   ├── libx11
            │   │   │   │   ├── libxcb
            │   │   │   │   │   ├── libpthread-stubs
            │   │   │   │   │   │   └── pkg-config
            │   │   │   │   │   ├── libxau
            │   │   │   │   │   │   └── xorgproto
            │   │   │   │   │   └── libxdmcp
            │   │   │   │   │       └── xorgproto
            │   │   │   │   └── xorgproto
            │   │   │   └── xorgproto
            │   │   ├── libxrender
            │   │   │   ├── libx11
            │   │   │   │   ├── libxcb
            │   │   │   │   │   ├── libpthread-stubs
            │   │   │   │   │   │   └── pkg-config
            │   │   │   │   │   ├── libxau
            │   │   │   │   │   │   └── xorgproto
            │   │   │   │   │   └── libxdmcp
            │   │   │   │   │       └── xorgproto
            │   │   │   │   └── xorgproto
            │   │   │   └── xorgproto
            │   │   ├── lzo
            │   │   └── pixman
            │   ├── glib
            │   │   ├── gettext
            │   │   ├── libffi
            │   │   ├── pcre
            │   │   └── [email protected]
            │   │       ├── gdbm
            │   │       ├── mpdecimal
            │   │       ├── [email protected]
            │   │       ├── readline
            │   │       ├── sqlite
            │   │       │   └── readline
            │   │       ├── tcl-tk
            │   │       │   └── [email protected]
            │   │       └── xz
            │   ├── libffi
            │   ├── pkg-config
            │   └── [email protected]
            │       ├── gdbm
            │       ├── mpdecimal
            │       ├── [email protected]
            │       ├── readline
            │       ├── sqlite
            │       │   └── readline
            │       ├── tcl-tk
            │       │   └── [email protected]
            │       └── xz
            ├── graphite2
            └── icu4c

@mrkite92
Copy link
Collaborator

All these dependencies are precisely the point, likely to collide with the Mac Ports ones...
The command

./configure --enable-auto-flags --enable-best-link --enable-icc --enable-mkl --with-mkl-dir=/opt/intel/mkl --prefix=/Users/marquett/Soft/astromatic/ --enable-accelerate

works fine, but the make fails:

make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src
Making all in fits
cc -DHAVE_CONFIG_H -I. -I../.. -F/opt/local/Library/Frameworks -framework AquaTerm -I/opt/local/include/plplot -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -O3 -g -funroll-loops -fomit-frame-pointer -Wall -D_REENTRANT -qopenmp -DMKL_ILP64 -I/opt/intel/mkl/include -MT fitsbody.o -MD -MP -MF .deps/fitsbody.Tpo -c -o fitsbody.o fitsbody.c
clang: error: unknown argument '-qopenmp'; did you mean '-fopenmp'?
clang: warning: -framework AquaTerm: 'linker' input unused [-Wunused-command-line-argument]
make[3]: *** [fitsbody.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

A typo?

Using gcc instead of icc works.

@lonewolf1870
Copy link
Author

As far as I understood while trying to make it work, clang does not have support to openmpi.
So, either you use gcc as it is done by brew, or you need to switch off openmpi

@mrkite92
Copy link
Collaborator

After two attempts of a massive tests, I confirm a segmentation fault, crash report below.
It occurs after

----- Astrometric stats (internal) :

/bin/sh: line 1: 75285 Segmentation fault: 11 /Users/marquett/Soft/astromatic/bin/scamp -c /Volumes/FabFour/baskerville/erosdata/astromatic_params/scamp.conf -ASTREF_CATALOG FILE -ASTREFCAT_NAME /Volumes/FabFour/pepperland/DR2/cg_DR2.ldac -VERBOSE_TYPE FULL -CHECKPLOT_DEV PDF cg619*.cat

Some numbers on my catalogs:

----- 2 instruments found for photometry:

Instrument P1 :
FILTER = 'R-EROS '

Instrument P2 :
FILTER = 'B-EROS '

----- 1 field group found:

Group 1: 1445 fields at 18:09:35.95 -28:49:10.1 with radius 60.23’

----- Reference catalogs:

WARNING: OBSDATE parameter not found in catalog cg_DR2.ldac

WARNING: FLAGS parameter not found in catalog cg_DR2.ldac

3179433 astrometric references loaded from cg_DR2.ldac
Group 1: 3179433 standards found in file (1 band)

----- Astrometric matching:

Group 1: 3179433 standards in file (band 1)

More info on request.

Cheers,
JB
scamp_2021-03-28-094423_MacbookProJB.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants